#include <iostream>
using namespace std;
#include <boost/bimap.hpp>
#include <boost/typeof/typeof.hpp>
using namespace boost::bimaps;

int main()
{
    bimap<int, string> bm;
    bm.left.insert(make_pair(1, "111"));
    bm.left.insert(make_pair(2, "222"));
    bm.right.insert(make_pair("string", 10));
    bm.right.insert(make_pair("bimap", 20));
    bm.right.insert(make_pair("bimap", 2));

    for (BOOST_AUTO(pos, bm.left.begin());
         pos != bm.left.end(); ++pos) {
        cout << "[" << pos->first << "]=" << pos->second << endl;
        //pos->second = 3;
    }
    cout << "----------------" << endl;
    for (BOOST_AUTO(pos, bm.right.begin());
         pos != bm.right.end(); ++pos) {
        cout << "[" << pos->first << "]=" << pos->second << endl;
    }
    return 0;
}
